package com.timmy.common;

/**
 * 统一返回结果类
 * created by zx on 2017.10.08
 */
public class BaseResult {
    public int code;//状态码，1为成功，其他为失败
    public String message;//success为成功，其它为失败原因
    public Object data;//数据结果集

    public BaseResult() {
    }

    public BaseResult(int code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "BaseResult{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }
}
